]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Get idle monitor from backend
authorJonas Ådahl <jadahl@gmail.com>
Thu, 6 May 2021 20:31:11 +0000 (22:31 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 18 May 2021 13:42:52 +0000 (13:42 +0000)
Its ownership has moved from dangeling to owned by the backend, which
has reflected the API is accessible by. Adapt to this change.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1838>

js/ui/magnifier.js
js/ui/messageTray.js
js/ui/pointerWatcher.js
js/ui/screenShield.js
js/ui/unlockDialog.js

index 75cc1f9013c479030c9643e539ed018a4d9dfeed..d818a75b0d189304e45a0cb76cc32924a4f4737e 100644 (file)
@@ -750,7 +750,7 @@ var ZoomRegion = class ZoomRegion {
         this._xCaret = 0;
         this._yCaret = 0;
 
-        this._pointerIdleMonitor = Meta.IdleMonitor.get_core();
+        this._pointerIdleMonitor = global.backend.get_core_idle_monitor();
         this._scrollContentsTimerId = 0;
     }
 
index 1dab00a7000d1ba1356f03dbab6a5ff31b0f444e..b793f8a167239bd81d0e7895d309a172ee327b8a 100644 (file)
@@ -855,7 +855,7 @@ var MessageTray = GObject.registerClass({
 
         this._userActiveWhileNotificationShown = false;
 
-        this.idleMonitor = Meta.IdleMonitor.get_core();
+        this.idleMonitor = global.backend.get_core_idle_monitor();
 
         this._useLongerNotificationLeftTimeout = false;
 
index 9dbdcf623c3b0ad3eee792b3df740dfe1193fa5f..2af35b617312e10c64fb7fb52894a5778a4187cd 100644 (file)
@@ -1,7 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 /* exported getPointerWatcher */
 
-const { GLib, Meta } = imports.gi;
+const { GLib } = imports.gi;
 
 // We stop polling if the user is idle for more than this amount of time
 var IDLE_TIME = 1000;
@@ -35,7 +35,7 @@ var PointerWatch = class {
 
 var PointerWatcher = class {
     constructor() {
-        this._idleMonitor = Meta.IdleMonitor.get_core();
+        this._idleMonitor = global.backend.get_core_idle_monitor();
         this._idleMonitor.add_idle_watch(IDLE_TIME, this._onIdleMonitorBecameIdle.bind(this));
         this._idle = this._idleMonitor.get_idletime() > IDLE_TIME;
         this._watches = [];
index 9a64fc32c3206783da6c4baf4e8843853ca2fda9..a1b32aa6bae0a3c5a550983bb3fd220730a01f63 100644 (file)
@@ -138,7 +138,7 @@ var ScreenShield = class {
                                                       fadeFactor: 1 });
         this._shortLightbox.connect('notify::active', this._onShortLightbox.bind(this));
 
-        this.idleMonitor = Meta.IdleMonitor.get_core();
+        this.idleMonitor = global.backend.get_core_idle_monitor();
         this._cursorTracker = Meta.CursorTracker.get_for_display(global.display);
 
         this._syncInhibitor();
index 8ddae8b036355b73bbd9b2a5d4476947efd4751a..239e75ef5b283c77c531eb13c49645d1aafe410e 100644 (file)
@@ -348,7 +348,7 @@ class UnlockDialogClock extends St.BoxLayout {
         this._powerModeChangedId = this._monitorManager.connect(
             'power-save-mode-changed', () => (this._hint.opacity = 0));
 
-        this._idleMonitor = Meta.IdleMonitor.get_core();
+        this._idleMonitor = global.backend.get_core_idle_monitor();
         this._idleWatchId = this._idleMonitor.add_idle_watch(HINT_TIMEOUT * 1000, () => {
             this._hint.ease({
                 opacity: 255,
@@ -594,7 +594,7 @@ var UnlockDialog = GObject.registerClass({
             this._otherUserButton);
         this.add_child(mainBox);
 
-        this._idleMonitor = Meta.IdleMonitor.get_core();
+        this._idleMonitor = global.backend.get_core_idle_monitor();
         this._idleWatchId = this._idleMonitor.add_idle_watch(IDLE_TIMEOUT * 1000, this._escape.bind(this));
 
         this.connect('destroy', this._onDestroy.bind(this));